{template "mheader.html"}
<div class="container d-gao-80">
</div>

<div class="container d-waigao-20 ">
	<div class="row d-xia-20">
	    <div class="col-md-8 ">
			
			<div class="d-yuanjiao-10 d-kuan d-beijing-baise d-bianhua-20 d-buhuanhang ">
				<div class="d-kuan-50 d-div-zuo">
					{category module=quan show=1 pid=0}
						{if $t.show == 1}
							{if $t.child}
								<div id="segmentedControls" class="">
									{category module=quan pid=$t.id show=1 return=t2}
										{if $t2.show == 1}
											<a class="mui-control-item  d-div-zuo d-hanggao-30  d-neikuang-2-5 d-xia-5 d-yuanjiao-5 mui-active"  >{$t2.name}</a>
										{/if}
									{/category}
								</div>
							{/if}
							
						{/if}
					{/category}
				</div>
				<div id="segmentedControlContents" class="d-kuan d-div-you ">
					{category module=quan show=1 pid=0}
						{if $t.show == 1}
							{if $t.child}
									{category module=quan pid=$t.id show=1 return=t2}
										{if $t2.show == 1}
										<div  class="mui-control-content d-daoyincang d-neikuang-2-5" >
											<div class="row d-quxian">
												{module module=quan zt=1 daquan=1 fstatus=1 order=displayorder_asc catid=$t2.id return=quan}
												<div id="quanziid">
													<div id="{$quan.id}" data-id="{$quan.id}"  data-cid="{$quan.id}">
														<a id="{$quan.id}">
														<div class="col-md-6 col-xs-12 d-waigao-20 d-div-zou  ">
															<div class="quanziid-item d-neikuang-10 d-yuanjiao-10" id="{$quan.id}" data-id="{$quan.id}"  data-cid="{$quan.id}">
																<div class=" d-yuanjiao-10 pull-left">
																	{if $quan.thumb}
																	<img class="d-yuanjiao-20" src="{dr_thumb($quan.thumb)}" height="50" width="50"/>
																	{else}
																	<img class="d-yuanjiao-20" src="{HOME_THEME_PATH}quan/img/xinping.png" height="50" width="50"/>
																	{/if}
																</div>
																<div class="d-zuo-10 pull-left">
																	
																		<div class="d-jiacu d-wenzi-16 d-kuan">{dr_keyword_highlight($quan.title, $keyword)}</div>
																		<div class="d-wenzi-14">
																			<span>
																				帖子
																				{count action=table table=1_quan_form_son cid=$quan.id return=tiezi}
																				{$tiezi_count}
																			</span>
																			<span class="d-zuo-20">
																				用户: {$quan.joins}
																			</span>
																			
																		</div>
																	
																</div>
																
																<div class="d-clear"></div>
															</div>
														</div>
														</a>
													</div>
												</div>
												{/module}
											</div>
										</div>
										{/if}
									{/category}
							{/if}
						{/if}
					{/category}
				</div>
				<div class="d-clear"></div>
				
			</div>
			
		</div>
		<div class="col-md-4 d-yincang">
			
		</div>
	</div>
</div>

<!--左边圈子-->


<script type="text/javascript">
	
	//var contentsHeight = document.body.clientHeight;
	var contentsHeight = $(window).height(); //获取高度
	var h = contentsHeight;
	{if $daohangzhanshi =='1'}
	// 新增 data-index 值
	for (var i=0;i<$('#segmentedControls a').length;i++) {
	$('#segmentedControls a').eq(i).attr('data-index',i)	
	$('.mui-control-content').eq(i).attr('id',i)
	$('.quanziid-item').eq(i).attr('id',i)
	}
	{/if}
	
	//默认选中第一个
	/*var controls = document.getElementById("segmentedControls");
	controls.querySelector('.mui-control-item').classList.add('mui-active');*/
	
		
		
	
	
	var value = document.cookie;
	var top2 = value.split('weatherTop2=');
	//console.log('获取高度',top2[1]);
	//
	$('#b2').scrollTop(top2[1]);
	 var is_mobile_cms = false;
	
	
	// 初始化时默认选中第一个选项
	 
	//console.log('daohangid',top2[1]);
	    var options = document.querySelectorAll('#segmentedControls .mui-control-item'); 
		const optionsArray = Array.from(options);
		//获取圈子id
		var quanziid = document.querySelectorAll('#quanziid .quanziid-item');
		const quanziidArray = Array.from(quanziid);

		// 圈子
	    var quans = document.querySelectorAll('.mui-control-content');
		//quans[0].classList.add('d-daoxianshi');
		quans[0].classList.remove('d-daoyincang'); 

	    // 为每个选项添加点击事件监听器  
	    optionsArray.forEach(function(option) {  
	        option.addEventListener('click', function() {  
	            // 移除所有选项的 mui-active 类  
	            optionsArray.forEach(function(opt) {  
	                opt.classList.remove('d-beijing-hei-f8');  
	            }); 
				quans.forEach(function(opt) {
				    opt.classList.remove('d-daoyincang');  
					opt.classList.remove('d-daoxianshi');  
					opt.classList.add('d-daoyincang'); 
					//console.log('opt',opt)
				});  
				// 存储点击id
				var daohangid = optionsArray.indexOf(this);
				var d = new Date();  
				d.setTime(d.getTime() + (365*24*60*60*1000)); // 设置过期时间为1年后  
				var expires = "expires=" + d.toUTCString();  
				document.cookie = "daohangid="+daohangid+"; " + expires + "; path=/";
	            // 给被点击的选项添加 mui-active 类  
	            this.classList.add('d-beijing-hei-f8');
				// console.log('classList',optionsArray.indexOf(this))
				var correspondingContent = quans[optionsArray.indexOf(this)];  // 找到被点击选项对应的内容  
				//console.log('correspondingContent',correspondingContent)
				    correspondingContent.classList.add('d-daoxianshi');  // 显示被点击选项对应的内容  
				    correspondingContent.classList.remove('d-daoyincang');  // 确保被点击的内容是显示的  
	        });  
	    });
		//圈子轩子
		quanziidArray.forEach(function(option) {
		    option.addEventListener('click', function() {
		        // 移除所有选项的 mui-active 类  
		        quanziidArray.forEach(function(opt) {  
		            opt.classList.remove('d-beijing-hei-f8');  
		        }); 
		        // 给被点击的选项添加 mui-active 类  
		        this.classList.add('d-beijing-hei-f8');
				// 修改栏目
				var ids = '{$_GET["id"]}';
				var id = $(this).data("id");
				var cid = $(this).data("cid");
				console.log('id00',id);
				
				//
				$.get("{dr_url_prefix('index.php')}?s=member&app=quan&c=son&m=qianyiid&id="+ids+"&cid="+cid, function(data){
				    dr_cmf_tips(data.code, data.msg);
				    if (data.msg=="迁移成功") {
						$('#module_favorite_'+id).html(data.data);
				        $('#d_qzzd_'+id).html('<img src="{HOME_THEME_PATH}web/img/quanzhi.png" width="40" height="40" class=""><div>取消全置</div>'
						);
						
					}else{
						$('#module_favorite_'+id).html(data.data);
				        $('#d_qzzd_'+id).html('<img src="{HOME_THEME_PATH}web/img/quanzhi01.png" width="40" height="40" class=""><div>全站置顶</div>'
				        );
					}
				}, 'json');
		    });  
		});
		
    
</script>

<style>
	*, :after, :before {
	    -webkit-box-sizing: border-box;
	    -moz-box-sizing: border-box;
	    box-sizing: border-box;
		scrollbar-color: #62464600 #b3353500;
	}
	.d-fabu-shezhi {
	    z-index: 999999;
	    position: fixed;
		justify-content: center;
		top: 50%;
		left: 50%;
	    /*bottom: 0px;*/
	    width: 700px;
	    /*height: 270px;*/
	    overflow: auto;
	    background: #ffffff;
	    transform: translate(-50%, -50%);
	    box-shadow: 0 0 20px #d6d6d6;
	    background-color: rgba(255, 255, 255, 1.0);
		border-radius: 10px;
	}
	.d-fabu-tiezi{
		
		transform: translate(-50%, -50%);
	}
	.d-fabu-fenleis {
	    padding-left: 10px;
	    padding-bottom: 10px;
	    resize: none;
	    border: none;
	}
	.d-fabu {
	    padding-top: 0px;
	    border: 1px solid #ddd;
	    /* padding-bottom: 10px; */
	}
	.form-control-fabu {
		
		/*width: 100%;*/
		/*height: 34px;*/
		font-size: 12px;
		padding: 2px 2px;
		/*background-color: #f3f4f7;*/
		border: 1px solid #f3f4f7;
		border-radius: 50px;
		/*-webkit-box-shadow: inset 0 1px 1px rgb(0 0 0 / 8%);
		-webkit-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
		-o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
		transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;*/
		
	}
	.form-control-fabu select {
	    background: #efefef;;
	    border-color: #ffffff;
		border-radius: 50px;
	    color: #333;
		font-size: 12px;
	    padding: 0px;
	}
	.form-control-fabu option {
	    font-weight: normal;
	    display: block;
	    white-space-collapse: collapse;
	    text-wrap: nowrap;
	    min-height: 1.2em;
	    padding: 0px 2px 1px;
	}
	.d-yincang-wenzi-jiugetu {
		display: none
	}
	.d-yincang-tu-jiugetu {
		display: none
	}
	.d-anniu-jiugetu {
		margin-top: 2px;
	    padding: 2px 7px;
		font-size: 12px;
		line-height: 1.5;
		border-radius: 50px;
		float: left!important;
		background-color: #efefef;
		color: #aaaaaa;
	}
	#fileupload_jiugetu {
		float: left!important;
	}
	.preview {
	    height: 55px;
	    border: 1px solid #f5f5f5;
	}
	.files_row .preview img {
	    max-height: 40px;
	    overflow: hidden;
	}
	.note-toolbar {
		display: none
	}
	.note-editor.note-frame .note-editing-area .note-editable, .note-editor.note-airframe .note-editing-area .note-editable {
	    padding: 0px;
	    overflow: auto;
	    word-wrap: break-word;
		min-height: 100px;
	}
	.note-statusbar {
		display: none
	}
	.d-fabu-neikuang-10 {
		padding: 10px 10px 0 10px;
	}
	.panel {
	    margin-bottom: 0px;
	    background-color: #fff;
	    border: 1px solid transparent;
	    border-radius: 4px;
	    -webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
	    box-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
	}
	.note-editable hr, .note-editable p {
	    margin: 2px 0;
	}
	.note-editor.note-frame, .note-editor.note-airframe {
		
	    border: 1px solid #ffffff;
	    border-radius: 4px;
	}
	.note-editable {
	  position: relative;
	}
	
	.note-editable:hover {
	  outline: none;
	  ::placeholder {
	    visibility: hidden;
	  }
	.shuoming {
		left: 0;
		top: 10px;
		position: fixed;
		width: 100px;
		  height: 100px;
	}
	/**/
	.mui-active{
		background-color: #999999;
	}
	.mui-table-view {
		width: 100%;
		
	}
	

</style>

{template "mfooter.html"}